package com.zhijian.medical.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 试卷状态枚举类
 */
@AllArgsConstructor
@Getter
public enum ExamStatusEnum {
    UN_SUBMIT(0, "未提交"),
    ALREADY_SUBMIT(1, "已提交"),
    REMOVE(2, "已作废");


    private Integer code;
    private String desc;

    public static ExamStatusEnum getByCode(Integer code) {
        ExamStatusEnum[] examStatusEnum = ExamStatusEnum.values();
        for (ExamStatusEnum tplTypeEnum : examStatusEnum) {
            if (tplTypeEnum.getCode().equals(code)) {
                return tplTypeEnum;
            }
        }
        return null;
    }
}
